// https://nuxt.com/docs/api/configuration/nuxt-config
import * as daisyui from "daisyui";

export default defineNuxtConfig({
  ssr: false,
  devtools: { enabled: true },
  modules: ["@nuxtjs/tailwindcss", "@nuxtjs/i18n", "@nuxt/content"],
  css: ["~/assets/styles/app.css"],
  app: {
    head: {
      title: "乐业派灵工平台",
      titleTemplate: "%s - 乐业派"
    }
  },

  runtimeConfig: {
    public: {
      GLOBAL_ENABLE_MOCK: process.env.GLOBAL_ENABLE_MOCK,
      STRIPE_PUBLIC_KEY: process.env.STRIPE_PUBLIC_KEY,
      AUTH_API_URL: process.env.AUTH_API_URL,
      INTENT_API_URL: process.env.INTENT_API_URL,
      META_API_URL: process.env.META_API_URL,
      ATTRACTION_API_URL: process.env.ATTRACTION_API_URL,
      GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID,
      GOOGLE_ANALYTICS_ID: process.env.GOOGLE_ANALYTICS_ID,
      WECHAT_OFFICIAL_ACCOUNT_APPID: process.env.WECHAT_OFFICIAL_ACCOUNT_APPID
    }
  },

  i18n: {
    vueI18n: './i18n.config.ts'
  },

  tailwindcss: {
    config: {
      plugins: [daisyui],
    },
  },

  vite: {
    server: {
      hmr: false
    }
  },
  compatibilityDate: "2025-02-10",
});
